#include "PhysicsWorld.h"

PhysicsWorld::PhysicsWorld()
{
}

PhysicsWorld::~PhysicsWorld()
{
}

void PhysicsWorld::Update()
{

}

void PhysicsWorld::UpdateObject(PhysicsObject &phyObj)
{
	phyObj.position = D2D1::SizeF(phyObj.position.width+phyObj.velocity.width,phyObj.position.height+phyObj.velocity.height);
	phyObj.center = D2D1::Point2F(phyObj.center.x+phyObj.velocity.width,phyObj.center.y+phyObj.velocity.height);
	phyObj.matrix = D2D1::Matrix3x2F::Translation(phyObj.position.width,phyObj.position.height) * D2D1::Matrix3x2F::Rotation(phyObj.angle,phyObj.center) * D2D1::Matrix3x2F::Identity();
}

void PhysicsWorld::AddObject(PhysicsObject &phyObj)
{
	phyObjVec.push_back(&phyObj);
}

void PhysicsWorld::RemoveObject(PhysicsObject &phyObject)
{

}